/**
* 全局配置信息， 包含网站标题，  动态组件定义
*
* @author terrfly
* @site https://www.jeepay.vip
* @date 2021/5/8 07:18
*/

/** 应用配置项 **/
export default {
  APP_TITLE: 'Jeepay商户系统', // 设置浏览器title
  ACCESS_TOKEN_NAME: 'iToken' // 设置请求token的名字， 用于请求header 和 localstorage中存在名称
}

let App

export function getGlobalApp() {
  return App
}

export function setGlobalApp(app) {
  App = app
}

/**
 * 与后端开发人员的路由名称及配置项
 * 组件名称 ：{ 默认跳转路径（如果后端配置则已动态配置为准）， 组件渲染 }
 * */
export const asyncRouteDefine = {

  'CurrentUserInfo': { defaultPath: '/current/userinfo', component: () => import('@/views/current/UserinfoPage.vue') }, // 用户设置
  'NoticeInfoPage': { defaultPath: '/notices', component: () => import('@/views/current/postList.vue') }, // 公告列表
  'AdvertInfoPage': { defaultPath: '/advert', component: () => import('@/views/sys/advert/Advert.vue')  }, // 广告配置

  'MainPage': { defaultPath: '/main', component: () => import('@/views/dashboard/Analysis.vue') },
  'SysUserPage': { defaultPath: '/users', component: () => import('@/views/sysuser/SysUserPage.vue') },
  'SysUserTeamPage': { defaultPath: '/team', component: () => import('@/views/sysuserteam/List.vue') },
  'AgentInfoPage': { defaultPath: '/agent', component: () => import('@/views/agent/AgentList.vue') },
  
  'WalletPage': { defaultPath: '/wallet', component: () => import('@/views/accountCenter/wallet/Wallet.vue') },
  'StatisticsPage': { defaultPath: '/statistics', component: () => import('@/views/accountCenter/statistics/Statistics.vue') },
  'PayConfigPage': { defaultPath: '/payConfig', component: () => import('@/views/accountCenter/payConfig/PayConfig.vue') },
  'HistoryPage': { defaultPath: '/history', component: () => import('@/views/accountCenter/history/History.vue') },
  
  'RolePage': { defaultPath: '/roles', component: () => import('@/views/role/RolePage.vue') },
  'AgentInfoMainPage' : { defaultPath: '/info', component: () => import('@/views/info/AgentInfo.vue') },  // 商户信息
  'MchAppPage': { defaultPath: '/apps', component: () => import('@/views/mchApp/List.vue') }, // 商户应用列表
  'MchQrCodePage': { defaultPath: '/mchQrCodes', component: () => import('@/views/qrcode/List.vue') }, // 商户应用列表
  'PayTestPage': { defaultPath: '/paytest', component: () => import('@/views/payTest/PayTest.vue') }, // 支付测试
  'MchTransferPage': { defaultPath: '/doTransfer', component: () => import('@/views/transfer/MchTransferPage.vue') }, // 转账

  'PayOrderListPage': { defaultPath: '/payOrder', component: () => import('@/views/order/pay/PayOrderList.vue') }, // 支付订单列表
  'RefundOrderListPage': { defaultPath: '/refundOrder', component: () => import('@/views/order/refund/RefundOrderList.vue') }, // 退款订单列表

  'StorePage': { defaultPath: '/store', component: () => import('@/views/store/StorePage.vue') }, // 商户门店管理
  'NoticePage': { defaultPath: '/notice', component: () => import('@/views/notice/NoticePage.vue') }, // 通知配置
  'MchConfigPage': { defaultPath: '/config', component: () => import('@/views/mchconfig/MchConfig.vue') }, // 系统配置

  'MchCountPage': { defaultPath: '/statistic/mch', component: () => import('@/views/statistic/mch/List.vue') }, // 商户统计
  'AgentCountPage': { defaultPath: '/statistic/agent', component: () => import('@/views/statistic/agent/List.vue') }, // 代理商统计
  'TransactionPage': { defaultPath: '/statistic/transaction', component: () => import('@/views/statistic/transaction/List.vue') }, // 交易报表
  'DeviceCountPage': { defaultPath: '/statistic/device', component: () => import('@/views/statistic/device/List.vue') }, // 设备统计

  'SpeakerDevicePage': { defaultPath: '/speaker/device', component: () => import('@/views/device/SpeakerList.vue')  }, // 云喇叭设备管理
  'PrinterDevicePage': { defaultPath: '/printer/device', component: () => import('@/views/device/PrinterList.vue')  }, // 云打印设备管理
  'PluginCdKeyPage': { defaultPath: '/plugin/cdkey', component: () => import('@/views/device/PluginCdKeyList.vue')  }, // 收银插件激活码管理
  'PosDevicePage': { defaultPath: '/pos/device', component: () => import('@/views/device/PosList.vue')  }, // 扫码POS管理
  'AutoPosPage': { defaultPath: '/auto/pos', component: () => import('@/views/device/AutoPosList.vue')  }, // 智能POS设备管理
  'FaceAppPage': { defaultPath: '/face', component: () => import('@/views/device/FaceAppList.vue')  }, // 刷脸APP管理
  'RuyiPage': { defaultPath: '/ruyi', component: () => import('@/views/device/RuyiList.vue')  }, // 刷脸APP管理

  'QrcodeCardPage': { defaultPath: '/mchQrCodes', component: () => import('@/views/qrcode/List.vue') }, // 码牌列表
  'MchApplymentListPage': { defaultPath: '/applyments', component: () => import('@/views/mch/applyment/MchApplymentList.vue')  }, // 进件
  'AgentListPage': { defaultPath: '/agent', component: () => import('@/views/agent/AgentList.vue')  }, // 代理商列表
  'MchListPage': { defaultPath: '/mch', component: () => import('@/views/mch/MchList.vue')  }, // 商户列表
  'TerminalPage': { defaultPath: '/cashouts', component: () => import('@/views/terminal/TerminalPage.vue') }, // 终端管理
  'AgentConfigPage': { defaultPath: '/config', component: () => import('@/views/agentconfig/AgentConfig.vue') }, // 系统配置

}